<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:ef="http://www.enginframe.com/2000/EnginFrame"
                exclude-result-prefixes="ef">

<!--
 * Copyright 1998-2008 by Nice, srl.,
 * Via Serra 33, Camerano Casasco, Asti, 14020, Italy
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Nice, srl. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Nice.
 * $Id: admin.layout.templates.xsl 7268 2007-07-05 15:19:14Z robby $
-->

  <xsl:template match="filemanager">

    <div id="my-files-view"><!-- my-files-view BEGIN -->
    
      <div class="my-files-widget"><!-- my-files-widget BEGIN -->
    
        <!-- toolbar - START -->
        <ul class="my-files-toolbar">
          <li class="my-files-toolbar"><a class="my-files-toolbar" href="javascript:FileManager['filemanager'].upload();"><img src="images/upload.png" height="16" width="16" /><span>&#160;&#160;Upload</span></a></li>
          <li class="separator"/>
          <li class="my-files-toolbar"><a class="my-files-toolbar" href="javascript:FileManager['filemanager'].createFolder();"><img src="images/folder-new.png" height="16" width="16" /><span>&#160;&#160;Create Folder</span></a></li>
          <li class="separator"/>
          <li class="my-files-toolbar" id="deleteButton"><a class="my-files-toolbar" href="javascript:FileManager['filemanager'].deleteSelectedFiles();"><img src="images/delete.png" height="16" width="16" /><span>&#160;&#160;Delete</span></a></li>
          <li class="my-files-toolbar" id="replicateButton"><a class="my-files-toolbar" href="javascript:FileManager['filemanager'].replicateSelectedFiles();"><img src="images/disk_multiple.png"/><span>&#160;&#160;Replicate</span></a></li>

          <li class="my-files-toolbar-right">
            <a class="my-files-toolbar" href="javascript:FileManager['filemanager'].refresh()"><img src="images/view-refresh.png" width="16" height="16" /><span>Refresh</span></a>
          </li>
<!--
          <li class="my-files-toolbar-right" id="openTerminal"><a class="my-files-toolbar" href="javascript:void(0)" onclick="javascript:launchTerminalFromCWD();"><img src="../images/terminals.png" height="16" width="16" /><span>Open Terminal Here</span></a></li>

          <li class="my-files-toolbar-right">
            <dl class="runservice-dropdown">
              <dt class="runservice-dropdown" id="runservice-ddheader" onmouseover="ddMenu('runservice',1)" onmouseout="ddMenu('runservice',-1)">Run Service Here &#9660;</dt>
              <dd class="runservice-dropdown" id="runservice-ddcontent" onmouseover="cancelHide('runservice')" onmouseout="ddMenu('runservice',-1)">
                <ul class="runservice-dropdown">
                  <xsl:for-each select="elements-service">
                    <li class="runservice-dropdown">
                      <a class="runservice-dropdown" href="javascript:void(0)">
                        <xsl:attribute name="onclick">javascript:launchServiceFromCWD(&quot;<xsl:value-of select="service-fname"/>&quot;);</xsl:attribute>
                        <xsl:value-of select="service-name"/>
                      </a>
                    </li>
                  </xsl:for-each>
                  <li><a href="javascript:void(0)" onclick="javascript:launchServiceListFromCWD();" class="more">More...</a></li>
                </ul>
              </dd>
            </dl>
          </li>
    -->      
        </ul>
        <!-- toolbar - END -->
<!-- 
        <div id="navbar" class="navigation-bar">
 -->
          <!-- DirectoryBar GWT Widget - BEGIN -->
          <!-- Apply the templates for the GWT widget -->
          <xsl:apply-templates select="ef:gwt[@id='directorybar']"/>
          <!-- DirectoryBar GWT Widget - END -->
<!-- 
        </div>
 -->
        
        <!-- FileManager GWT Widget - BEGIN -->
        <!-- Apply the templates for the GWT widget -->
        <xsl:apply-templates select="ef:gwt[@id='filemanager']"/>
        <!-- FileManager GWT Widget - END -->
    
      </div><!-- my-files-widget END -->
      
    </div><!-- my-files-view END -->
    
     <!-- Inject init params -->
     <!-- Used by the HTML+JS part - Not used by GWT anymore -->
      <script language="javascript" type="text/javascript">
        var ElementsEntryPointInitParams = {
         <xsl:for-each select="init-param">
           "<xsl:value-of select="@id"/>": <xsl:value-of select="."/>
           <xsl:if test="position() != last()">,</xsl:if>
         </xsl:for-each>
        }
      </script>
       
  </xsl:template>

</xsl:stylesheet>
